#ifndef TUNNEL_MAINWINDOW_H
#define TUNNEL_MAINWINDOW_H

#include <QtGui/QMainWindow>
#include <QTGui/QStandardItemModel>
#include "clientsocket.h"
#include "AddFriendDialog.h"
#include "friendinventationdialog.h"
#include <vector>

namespace Ui
{
    class Tunnel_MainWindow;
}

class ChatHandler;
class ClientSocket;
class Tunnel_MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    Tunnel_MainWindow(QWidget *parent = 0);
    ~Tunnel_MainWindow();

private:
    Ui::Tunnel_MainWindow *ui;
    ClientSocket *socket;
    QStandardItemModel *friendlistItemModel;
    AddFriendDialog *addFriendDialog;
    std::vector<FriendInventationDialog *> friendRequests;

private slots:
    void on_pbNewFriend_clicked();
    void on_lePasswort_returnPressed();
    void on_leBenutzername_returnPressed();
    void on_teMessage_returnWithoutShiftPressed();
    void on_action_Beenden_activated();
    void on_pbSenden_clicked();
    void on_pbLogin_clicked();
    void displayError(QAbstractSocket::SocketError socketError);
    void on_socketDisconnected();
    void on_newMessage(const QString &sender, QString &message);
    void on_cSocketError(const QString &error);
    void on_updateFriendlist(QString sFriendlist);
    void on_incommingFriendrequest(QString sFriendrequests);
    void on_changeLoginStatus(int progress, const QString &status);
    void addNewFriend(const QString &friend_loginName, const QString &rMessage);
    void acceptFriendInventation(const quint32 &applicant_uid);
};

#endif // TUNNEL_MAINWINDOW_H
